package org.orange.spring.mvc.simulate.coolingme.springframework.webmvc.servlet;

import java.lang.reflect.Method;
import java.util.regex.Pattern;

/**
 * 路径映射
 *
 * @author wangyue
 * @date 2020/11/12 11:13
 */
public class MeHandlerMapping {

    /**
     * 路径,正则
     */
    private Pattern url;

    /**
     * method对应的实例对象，就不需要进行反射操作了
     */
    private Object controller;

    /**
     * 方法
     */
    private Method method;

    public MeHandlerMapping(Pattern url, Object controller, Method method) {
        this.url = url;
        this.controller = controller;
        this.method = method;
    }

    public Pattern getUrl() {
        return url;
    }

    public void setUrl(Pattern url) {
        this.url = url;
    }

    public Object getController() {
        return controller;
    }

    public void setController(Object controller) {
        this.controller = controller;
    }

    public Method getMethod() {
        return method;
    }

    public void setMethod(Method method) {
        this.method = method;
    }
}
